package com.xxxx.portal.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;

/**
 * @Author Lionel
 * @Date 2020/11/6 12:56
 * Created by IntelliJ IDEA 2020.1.
 * Project: shop
 * Description：订单模块控制层
 */
@Controller
@RequestMapping("/order")
public class OrderController {

    /**
     * 购物车跳转至订单
     * @param request
     * @return
     */
    @RequestMapping("/toPreOrder")
    public String toPreOrder(HttpServletRequest request){
        String orderUrl = (String) request.getSession().getServletContext().getAttribute("orderUrl");
        return "redirect:"+orderUrl+"order/preOrder";
    }

}
